<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>核算项目--仓库修改</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/public.css">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath()%>/css/baseset/moneykind_input.css">
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/public.js"></script>
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/validate.js"></script>
		<script language="JavaScript"
			src="<%=request.getContextPath()%>/js/date1.js"></script>

		<script type="text/javascript">
			function validate(){
				var storageCode = document.getElementById("storageCode");
				var storageName = document.getElementById("storageName");
				var storagePhone = document.getElementById("storagePhone");
				if (!isNotNull(storageCode,'仓库代码'))
				return false;
				if (!f_check_NumOrLett(storageCode,'仓库代码'))
					return false;
				if (!f_check_NumLength(storageCode,'仓库代码'))
					return false;
				if (!isNotNull(storageName,'仓库名称'))
				return false;
				if (!f_check_ZhOrNumOrLett(storageName,'仓库名称'))
					return false;
					
				if (!f_check_passwordLength(storageName,'仓库名称',1,25))
					return false;
					
				if(!isNull(storagePhone,'电话号码')){
					if(!f_check_number(storagePhone,'电话号码'))
						return false;
				}
			}
		</script>
	</head>

	<body>
		<div id="info_all" style="width: 284px;">
			<div id="info_top">
				核算项目--仓库修改
			</div>
			<div style="width: 280px; margin-top: 6px;">
				<s:form action="editStorage.action" method="post"
					theme="simple" onsubmit="return validate()">
					<table
						style="margin-top: 10px; background: #fbfbfb; color: #403040;"
						align="center">
						<tr>
							<td>
								代码*
							</td>
							<td>
								<s:hidden name="sdto.storage.storageId" id="storageId"></s:hidden>
								<s:textfield name="sdto.storage.storageCode" id="storageCode"
									size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								名称*
							</td>
							<td>
								<s:textfield name="sdto.storage.storageName" id="storageName"
									size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								仓库管理员
							</td>
							<td>
								<s:hidden name="sdto.storage.PBaseVerifyprojectCandiateId"
									id="candiateId"></s:hidden>
								<s:textfield name="sdto.candiate.candiateName" id="candiateName"
									size="15" readonly="true" size="15"></s:textfield>
								<img src="images/kookup.gif" style="cursor: pointer"
									onclick="openWin('selectCandiate.action','candiate',1050,700,0)">
							</td>
						</tr>
						<tr>
							<td>
								仓库地址
							</td>
							<td>
								<s:textfield name="sdto.storage.storageAddress"
									id="storageAddress" size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								电话
							</td>
							<td>
								<s:textfield name="sdto.storage.storagePhone" id="storagePhone"
									size="15"></s:textfield>
							</td>
						</tr>
						<tr>
							<td>
								仓库类型*
							</td>
							<td>
								<s:if test="sdto.storage.PBaseVerifyprojectStoragetypeId == 1">
								
									<s:select list="#{'1':'普通仓','2':'虚仓','3':'其他'}"
											name="sdto.storage.PBaseVerifyprojectStoragetypeId"  cssStyle="width:100px;">
									</s:select>
								</s:if>
								<s:elseif test="sdto.storage.PBaseVerifyprojectStoragetypeId == 2">
									<s:select list="#{'2':'虚仓','1':'普通仓','3':'其他'}"
											name="sdto.storage.PBaseVerifyprojectStoragetypeId" cssStyle="width:100px;">
									</s:select>
								</s:elseif>
								<s:elseif test="sdto.storage.PBaseVerifyprojectStoragetypeId == 3">
									<s:select list="#{'3':'其他','1':'普通仓','2':'虚仓'}"
											name="sdto.storage.PBaseVerifyprojectStoragetypeId" cssStyle="width:100px;">
									</s:select>
								</s:elseif>
								<s:else>
										<s:select list="#{'1':'普通仓','2':'虚仓','3':'其他'}"
											name="sdto.storage.PBaseVerifyprojectStoragetypeId"  cssStyle="width:100px;">
									    </s:select>
								</s:else>
							</td>
						</tr>
						<tr>
							<td>
								<div style="margin-top: 8px; text-align: right;">
									<input type="submit" value="保存" onFocus="this.blur()"
										onMouseOver="this.className='btnover'"
										onmouseout="this.className='btnout'" class="btnsize" />
								</div>
							</td>
							<td>
								<div style="margin-top: 8px; text-align: center;">
									<input type="button" value="返回"
										onclick="javascript:history.go(-1)" onFocus="this.blur()"
										onMouseOver="this.className='btnover'"
										onmouseout="this.className='btnout'" class="btnsize" />
								</div>
							</td>
						</tr>
					</table>
				</s:form>
			</div>
		</div>
	</body>
</html>
